﻿namespace Simulacion.Desktop
{
    using System;
    using System.Diagnostics;
    using System.Windows;

    using Simulacion.Desktop.ViewModels;

    using Visifire.Charts;

    public partial class MainWindow : Window, IMainWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = new MainWindowViewModel(this);
        }

        public void DrawPoint(double x, double y)
        {
            Trace.WriteLine(string.Format("Graph Points: x={0};y={1}", x, y), "View");

            this.BandwithPerTimeDataSeries.DataPoints.Add(new DataPoint { XValue = x, YValue = y });
        }

        public void ClearGraphs()
        {
            this.BandwithPerTimeDataSeries.DataPoints.Clear();
        }
    }
}
